export const namespace = "stadiumFacility";
import { Image } from "antd";

export const calcColumns = (params) => {
  const columns = [
    {
      title: "ID",
      hidden: process.env.UMI_ENV == "prod" ? true : false,
      width: 200,
      dataIndex: "id",
      hideInSearch: true,
    },
    {
      title: "设施名称",
      dataIndex: "facilityName",
    },
    {
      title: "ICON",
      dataIndex: "iconUrl",
      render: (_) => (_.includes("http") ? <Image width={40} src={_} /> : "-"),
      hideInSearch: true,
    },
  ];
  if (params?.operate) {
    columns.push(params?.operate);
  }
  return columns;
};
